#!/bin/bash
baseDirForScriptSelf=$(cd "$(dirname "$0")"; pwd)
# 初始化环境变量
source ${baseDirForScriptSelf}/source.sh
# 为了防止某个依赖安装失败导致整个失败,逐个安装
## 内网不需要配置代理
if [ "${is_huawei}" == "true" ];then
    unset http_proxy;unset https_proxy
fi
echo 'Installing the dependency using the apt-get, about 5 to 10 minutes.'
need_tools=`cat ${baseDirForScriptSelf}/apt_install.list`

for one_tools in ${need_tools}
do
    echo "Install ${one_tools} ..."
    sudo bash -c "apt-get install -y  ${one_tools} >>${baseDirForScriptSelf}/init_run.log 2>&1"
done
